/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 38917
 * Date: 2025-03-07
 * Time: 19:22
 */
public class main6 {
    public static int find(int[] array){
        int n = 0;
        for (int i = 0; i < array.length; i++) {
            n = array[i] ^ n;
        }
        return n;
    }
    public static void main(String[] args) {
        //给定一个非空整数数组，除了某个元素只出现一次以外，其余每个元素均出现两次。找出那个只出现了一次的元素
        int[] array = {1,2,2,3,3,1,5};
        System.out.println(find(array));
    }
}
